---------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Userdata\Shared\Dofiles\DoAnalysis\PlacementCandidacy\Output\TableA4b.log
  log type:  text
 opened on:   2 Oct 2020, 10:32:47

.   
.   use "E:\ProjData\UtplaceringsData8594\utp-UtpData.dta", clear 

.   
.   merge 1:1 LopNr Ar using "E:\ProjData\UtplaceringsData8594\utp-EthnicContacts.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                       126,931
        from master                   126,931  (_merge==1)
        from using                          0  (_merge==2)

    matched                         1,566,770  (_merge==3)
    -----------------------------------------

.   replace ArbAnd = 0 if ArbAnd == .
(1,018,325 real changes made)

.   
.   replace mNom = mNom*100
(5,666 real changes made)

.   replace mVald = mVald*100
(1,080 real changes made)

.   
.   rename mNom Nominerad

.   rename mVald Vald

.   destring sKommun, gen(KommunValAr) 
sKommun: all characters numeric; KommunValAr generated as int

.   
. //Keep only refugee immigrants
.   keep if FlyktInv == 1
(308,021 observations deleted)

.     
. //Recode earnings to monthly wages in 1000 SEK
.   replace LoneInk = ((LoneInk*100)/12)/1000
variable LoneInk was long now double
(779,527 real changes made)

. 
.   gen Kvinna = -1*(Kon-1)

.   
.  // Merge on municipality data 
.    gen kkod = KommunKod

.    
.    capture drop _merge

.    merge m:1 kkod Ar using "E:\ProjData\UtplaceringsData8594\utp-MunData.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                        83,260
        from master                    83,259  (_merge==1)
        from using                          1  (_merge==2)

    matched                         1,302,421  (_merge==3)
    -----------------------------------------

.    
.   listwise Alder Kvinna Gift_InvAr Barn0_15_InvAr UtbAr_InvAr logpEnklavInvAr Nominerad Vald  InvAlder  InvAr TidI InvAlder logpEnklavVuxen
> InvAr ///
>            mUtb_infodda Herfindahl effectiveparties disproportionality //leftshare

.  
.   gen invHerfindahl = 1-Herfindahl

.   
.   local sample "inrange(InvAr, 1987, 1991) & inrange(InvAlder, 18, 55) & inrange(Ar, 1991, 2014) & FlyktInv == 1 & Rostratt == 1"

.   local controls1 "InvAr IFAUkod Ar FodelseAr"

.   local controls2 "Kvinna Gift_InvAr UtbAr_InvAr Barn0_15_InvAr"

.   local controls3 "LoneInk UtbAr Sysselsatt" 

.   local controls4 "effectiveparties disproportionality leftshare migrantshare invHerfindahl mUtb_infodda"

. 
.   egen InKomByKom = group(InKommun KommunValAr)

.   
.   qui: reghdfe Nominerad (logpEnklavVuxen = logpEnklavVuxenInvAr) if `sample', absorb(InKommun `controls1') cluster(KommunValAr) stages(fir
> st) old 
(running historical version of reghdfe)

.   keep if e(sample) == 1
(713,738 observations deleted)

.   
. //################################ Column 1 of Table A4b ###########################// 
.   
.   reghdfe Nominerad `controls2' RMKvot (logpEnklavVuxen = logpEnklavVuxenInvAr) if `sample', absorb(InKommun `controls1') cluster(InKommun)
>  stages(first) old 
(running historical version of reghdfe)
(converged in 9 iterations)

Stage: first - logpEnklavVuxen

HDFE Linear regression                            Number of obs   =    349,384
Absorbing 5 HDFE groups                           F(   6,    285) =     130.59
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.4836
                                                  Adj R-squared   =     0.4831
                                                  Within R-sq.    =     0.1843
Number of clusters (InKommun) =        286        Root MSE        =     0.6467

                                     (Std. Err. adjusted for 286 clusters in InKommun)
--------------------------------------------------------------------------------------
                     |               Robust
     logpEnklavVuxen |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
logpEnklavVuxenInvAr |   .2723938   .0218611    12.46   0.000     .2293641    .3154234
              Kvinna |  -.0097392   .0055395    -1.76   0.080    -.0206428    .0011644
          Gift_InvAr |   .0178959   .0069965     2.56   0.011     .0041246    .0316672
         UtbAr_InvAr |  -.0104685   .0012596    -8.31   0.000    -.0129477   -.0079893
      Barn0_15_InvAr |   .0090291   .0026419     3.42   0.001     .0038291    .0142291
              RMKvot |  -243.4931   12.03017   -20.24   0.000    -267.1723   -219.8138
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
            InKommun |            0             286            286 *   | 
               InvAr |            4               5              1     | 
             IFAUkod |           15              16              1     | 
                  Ar |            6               7              1 ?   | 
           FodelseAr |           41              42              1 ?   | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

Stage: iv

HDFE IV (2SLS) estimation
-------------------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on InKommun

Number of clusters (InKommun) =    286                Number of obs =   349384
                                                      F(  6,   285) =    24.65
                                                      Prob > F      =   0.0000
Total (centered) SS     =  20119538.67                Centered R2   =   0.0111
Total (uncentered) SS   =  20119538.67                Uncentered R2 =        .
Residual SS             =  20026943.88                Root MSE      =    7.575

---------------------------------------------------------------------------------
                |               Robust
      Nominerad |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
----------------+----------------------------------------------------------------
logpEnklavVuxen |  -.3729679   .1599776    -2.33   0.020    -.6878555   -.0580802
         Kvinna |  -.1722147   .0404429    -4.26   0.000    -.2518194   -.0926101
     Gift_InvAr |   .1661474   .0560469     2.96   0.003      .055829    .2764658
    UtbAr_InvAr |   .0961133   .0125304     7.67   0.000     .0714494    .1207772
 Barn0_15_InvAr |  -.0111401   .0196351    -0.57   0.571    -.0497884    .0275082
         RMKvot |   329.8971   46.36407     7.12   0.000     238.6377    421.1566
---------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             43.530
                                                   Chi-sq(1) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):              2.7e+04
                         (Kleibergen-Paap rk Wald F statistic):        155.257
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         logpEnklavVuxen
Included instruments: Kvinna Gift_InvAr UtbAr_InvAr Barn0_15_InvAr RMKvot
Excluded instruments: logpEnklavVuxenInvAr
------------------------------------------------------------------------------

Absorbed degrees of freedom:
------------------------------------------------------------------+
    Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
----------------+-------------------------------------------------|
       InKommun |            0             286            286 *   | 
          InvAr |            4               5              1     | 
        IFAUkod |           15              16              1     | 
             Ar |            6               7              1 ?   | 
      FodelseAr |           41              42              1 ?   | 
------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

.   eststo c1

.   
. //################################ Column 2 of Table A4b ###########################// 
.   
.   reghdfe Nominerad `controls2' RMKvot `controls4' (logpEnklavVuxen = logpEnklavVuxenInvAr) if `sample', ///
>                                  absorb(InKommun `controls1') cluster(InKommun) stages(first) old keepsingletons
(running historical version of reghdfe)
(WARNING: singletons are not dropped; statistical significance might be biased [link])
(converged in 9 iterations)

Stage: first - logpEnklavVuxen

HDFE Linear regression                            Number of obs   =    349,384
Absorbing 5 HDFE groups                           F(  12,    285) =     596.87
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.6234
                                                  Adj R-squared   =     0.6230
                                                  Within R-sq.    =     0.4051
Number of clusters (InKommun) =        286        Root MSE        =     0.5523

                                     (Std. Err. adjusted for 286 clusters in InKommun)
--------------------------------------------------------------------------------------
                     |               Robust
     logpEnklavVuxen |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
logpEnklavVuxenInvAr |   .2647629   .0207421    12.76   0.000     .2239359      .30559
              Kvinna |  -.0034865   .0046797    -0.75   0.457    -.0126977    .0057246
          Gift_InvAr |   .0143121   .0061185     2.34   0.020     .0022689    .0263553
         UtbAr_InvAr |  -.0103183   .0012589    -8.20   0.000    -.0127962   -.0078404
      Barn0_15_InvAr |   .0166012   .0021662     7.66   0.000     .0123375     .020865
              RMKvot |  -1.229842   10.35108    -0.12   0.906     -21.6041    19.14442
    effectiveparties |   .0416201   .0146811     2.83   0.005     .0127231    .0705172
  disproportionality |   .0250115   .0072668     3.44   0.001     .0107081    .0393149
           leftshare |   .0382548   .1246318     0.31   0.759    -.2070609    .2835704
        migrantshare |    5.60194   .1042992    53.71   0.000     5.396646    5.807235
       invHerfindahl |   1.907862    .178871    10.67   0.000     1.555786    2.259937
        mUtb_infodda |   .1067217   .0204831     5.21   0.000     .0664043     .147039
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
            InKommun |            0             286            286 *   | 
               InvAr |            4               5              1     | 
             IFAUkod |           15              16              1     | 
                  Ar |            6               7              1 ?   | 
           FodelseAr |           41              42              1 ?   | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

Stage: iv

HDFE IV (2SLS) estimation
-------------------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on InKommun

Number of clusters (InKommun) =    286                Number of obs =   349384
                                                      F( 12,   285) =    24.34
                                                      Prob > F      =   0.0000
Total (centered) SS     =  20119538.67                Centered R2   =   0.0113
Total (uncentered) SS   =  20119538.67                Uncentered R2 =        .
Residual SS             =  20022013.17                Root MSE      =    7.574

------------------------------------------------------------------------------------
                   |               Robust
         Nominerad |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------------+----------------------------------------------------------------
   logpEnklavVuxen |  -.3649733   .1645678    -2.22   0.027    -.6888958   -.0410509
            Kvinna |  -.1711153   .0401267    -4.26   0.000    -.2500976   -.0921331
        Gift_InvAr |   .1676419   .0561424     2.99   0.003     .0571356    .2781481
       UtbAr_InvAr |   .0971038   .0126313     7.69   0.000     .0722413    .1219663
    Barn0_15_InvAr |   -.011925   .0198164    -0.60   0.548      -.05093      .02708
            RMKvot |   330.4797    60.6841     5.45   0.000     211.0338    449.9256
  effectiveparties |  -.0509253   .0446879    -1.14   0.255    -.1388855     .037035
disproportionality |   .0168778   .0244962     0.69   0.491    -.0313387    .0650943
         leftshare |   1.621149   .6317602     2.57   0.011     .3776416    2.864657
      migrantshare |  -.9272565   .9790512    -0.95   0.344    -2.854345    .9998321
     invHerfindahl |   .7890487   .8377663     0.94   0.347    -.8599456    2.438043
      mUtb_infodda |  -.0221125   .0809464    -0.27   0.785    -.1814411    .1372161
------------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             45.113
                                                   Chi-sq(1) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):              3.5e+04
                         (Kleibergen-Paap rk Wald F statistic):        162.934
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         logpEnklavVuxen
Included instruments: Kvinna Gift_InvAr UtbAr_InvAr Barn0_15_InvAr RMKvot
                      effectiveparties disproportionality leftshare migrantshare
                      invHerfindahl mUtb_infodda
Excluded instruments: logpEnklavVuxenInvAr
------------------------------------------------------------------------------

Absorbed degrees of freedom:
---------------------------------------------------------------------+
       Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
-------------------+-------------------------------------------------|
          InKommun |            0             286            286 *   | 
             InvAr |            4               5              1     | 
           IFAUkod |           15              16              1     | 
                Ar |            6               7              1 ?   | 
         FodelseAr |           41              42              1 ?   | 
---------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

.   eststo c2

.   
. //################################ Column 3 of Table A4b ###########################// 
.   
.   reghdfe Nominerad `controls2' (logpEnklavVuxen = logpEnklavVuxenInvAr) if `sample', ///
>                                  absorb(InKommun `controls1' KommunValAr) cluster(InKommun KommunValAr) stages(first) old 
(running historical version of reghdfe)
(dropped 1 singleton observations)
(converged in 15 iterations)

Stage: first - logpEnklavVuxen

HDFE Linear regression                            Number of obs   =    349,383
Absorbing 6 HDFE groups                           F(   5,    285) =      43.51
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.6689
                                                  Adj R-squared   =     0.6682
Number of clusters (InKommun) =        286        Within R-sq.    =     0.0970
Number of clusters (KommunValAr) =        325     Root MSE        =     0.5181

                         (Std. Err. adjusted for 286 clusters in InKommun KommunValAr)
--------------------------------------------------------------------------------------
                     |               Robust
     logpEnklavVuxen |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
logpEnklavVuxenInvAr |   .2538009   .0250821    10.12   0.000     .2044312    .3031706
              Kvinna |  -.0013262   .0054307    -0.24   0.807    -.0120156    .0093632
          Gift_InvAr |   .0103135   .0073399     1.41   0.161    -.0041339    .0247609
         UtbAr_InvAr |  -.0086136   .0016685    -5.16   0.000    -.0118978   -.0053294
      Barn0_15_InvAr |   .0146733   .0032789     4.48   0.000     .0082194    .0211272
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
            InKommun |            0             286            286 *   | 
               InvAr |            4               5              1     | 
             IFAUkod |           15              16              1     | 
                  Ar |            6               7              1 ?   | 
           FodelseAr |           41              42              1 ?   | 
         KommunValAr |            0             325            325 *   | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

Stage: iv

HDFE IV (2SLS) estimation
-------------------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on InKommun and KommunValAr

Number of clusters (InKommun) =    286                Number of obs =   349383
Number of clusters (KommunValAr) =    325             F(  5,   285) =     7.64
                                                      Prob > F      =   0.0000
Total (centered) SS     =  19907435.44                Centered R2   =   0.0182
Total (uncentered) SS   =  19907435.44                Uncentered R2 =        .
Residual SS             =  19883377.33                Root MSE      =    7.551

---------------------------------------------------------------------------------
                |               Robust
      Nominerad |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
----------------+----------------------------------------------------------------
logpEnklavVuxen |  -.3062531   .1710079    -1.79   0.074    -.6428518    .0303456
         Kvinna |  -.1784994   .0483921    -3.69   0.000    -.2737507   -.0832481
     Gift_InvAr |   .1743765   .0743456     2.35   0.020     .0280404    .3207125
    UtbAr_InvAr |   .0969634   .0167054     5.80   0.000     .0640817    .1298451
 Barn0_15_InvAr |  -.0153748   .0219011    -0.70   0.483    -.0584833    .0277337
---------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             34.390
                                                   Chi-sq(1) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):              3.6e+04
                         (Kleibergen-Paap rk Wald F statistic):        102.390
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         logpEnklavVuxen
Included instruments: Kvinna Gift_InvAr UtbAr_InvAr Barn0_15_InvAr
Excluded instruments: logpEnklavVuxenInvAr
------------------------------------------------------------------------------

Absorbed degrees of freedom:
------------------------------------------------------------------+
    Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
----------------+-------------------------------------------------|
       InKommun |            0             286            286 *   | 
          InvAr |            4               5              1     | 
        IFAUkod |           15              16              1     | 
             Ar |            6               7              1 ?   | 
      FodelseAr |           41              42              1 ?   | 
    KommunValAr |            0             325            325 *   | 
------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

.   eststo c3

.  
. 
.  //################################ Column 4 of Table A4b ###########################// 
.   
.   reghdfe Nominerad `controls2' (logpEnklavVuxen = logpEnklavVuxenInvAr) if `sample', ///
>                                  absorb(InKomByKom `controls1') cluster(InKomByKom) stages(first) old keepsingletons
(running historical version of reghdfe)
(WARNING: singletons are not dropped; statistical significance might be biased [link])
(converged in 11 iterations)

Stage: first - logpEnklavVuxen

HDFE Linear regression                            Number of obs   =    349,384
Absorbing 5 HDFE groups                           F(   5,  14033) =      40.07
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.7704
                                                  Adj R-squared   =     0.7608
                                                  Within R-sq.    =     0.1400
Number of clusters (InKomByKom) =     14,034      Root MSE        =     0.4400

                                (Std. Err. adjusted for 14,034 clusters in InKomByKom)
--------------------------------------------------------------------------------------
                     |               Robust
     logpEnklavVuxen |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
logpEnklavVuxenInvAr |   .3014116   .0258192    11.67   0.000     .2508025    .3520207
              Kvinna |  -.0023372   .0036681    -0.64   0.524    -.0095273    .0048528
          Gift_InvAr |   .0059817   .0054568     1.10   0.273    -.0047142    .0166777
         UtbAr_InvAr |  -.0057072   .0010733    -5.32   0.000     -.007811   -.0036035
      Barn0_15_InvAr |   .0110848   .0020604     5.38   0.000     .0070462    .0151234
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
          InKomByKom |            0           14034          14034 *   | 
               InvAr |            4               5              1     | 
             IFAUkod |           15              16              1     | 
                  Ar |            6               7              1 ?   | 
           FodelseAr |           41              42              1 ?   | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

Stage: iv

HDFE IV (2SLS) estimation
-------------------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on InKomByKom

Number of clusters (InKomByKom) =  14034              Number of obs =   349384
                                                      F(  5, 14033) =    15.93
                                                      Prob > F      =   0.0000
Total (centered) SS     =  17909547.66                Centered R2   =   0.1167
Total (uncentered) SS   =  17909547.66                Uncentered R2 =        .
Residual SS             =  17887773.49                Root MSE      =    7.304

---------------------------------------------------------------------------------
                |               Robust
      Nominerad |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
----------------+----------------------------------------------------------------
logpEnklavVuxen |  -.3184344   .1332796    -2.39   0.017    -.5796801   -.0571886
         Kvinna |  -.1956966   .0450707    -4.34   0.000    -.2840412    -.107352
     Gift_InvAr |   .1787794   .0607667     2.94   0.003     .0596686    .2978903
    UtbAr_InvAr |   .0938697   .0118428     7.93   0.000     .0706563     .117083
 Barn0_15_InvAr |  -.0172686   .0215335    -0.80   0.423    -.0594771    .0249399
---------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             45.790
                                                   Chi-sq(1) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):              5.5e+04
                         (Kleibergen-Paap rk Wald F statistic):        136.281
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         logpEnklavVuxen
Included instruments: Kvinna Gift_InvAr UtbAr_InvAr Barn0_15_InvAr
Excluded instruments: logpEnklavVuxenInvAr
------------------------------------------------------------------------------

Absorbed degrees of freedom:
------------------------------------------------------------------+
    Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
----------------+-------------------------------------------------|
     InKomByKom |            0           14034          14034 *   | 
          InvAr |            4               5              1     | 
        IFAUkod |           15              16              1     | 
             Ar |            6               7              1 ?   | 
      FodelseAr |           41              42              1 ?   | 
------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

.   eststo c4

.  
.   reghdfe Nominerad `controls2' `controls4' (logpEnklavVuxen = logpEnklavVuxenInvAr) if `sample', ///
>                                  absorb(`controls1') cluster(InKommun) stages(first) old 
(running historical version of reghdfe)
(converged in 7 iterations)

Stage: first - logpEnklavVuxen

HDFE Linear regression                            Number of obs   =    349,384
Absorbing 4 HDFE groups                           F(  11,    285) =     238.49
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.5952
                                                  Adj R-squared   =     0.5951
                                                  Within R-sq.    =     0.4279
Number of clusters (InKommun) =        286        Root MSE        =     0.5724

                                     (Std. Err. adjusted for 286 clusters in InKommun)
--------------------------------------------------------------------------------------
                     |               Robust
     logpEnklavVuxen |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
logpEnklavVuxenInvAr |   .1917482   .0158299    12.11   0.000     .1605899    .2229066
              Kvinna |  -.0145764   .0051409    -2.84   0.005    -.0246954   -.0044574
          Gift_InvAr |   .0228927    .007386     3.10   0.002     .0083547    .0374306
         UtbAr_InvAr |  -.0138452     .00126   -10.99   0.000    -.0163254    -.011365
      Barn0_15_InvAr |   .0222422   .0025669     8.66   0.000     .0171897    .0272947
    effectiveparties |   .0580267   .0185051     3.14   0.002     .0216027    .0944507
  disproportionality |   .0211284   .0103545     2.04   0.042     .0007474    .0415093
           leftshare |   .1064064   .1282778     0.83   0.408    -.1460857    .3588986
        migrantshare |    5.22304    .190571    27.41   0.000     4.847935    5.598145
       invHerfindahl |   1.707604   .2077169     8.22   0.000      1.29875    2.116458
        mUtb_infodda |   .0385169   .0299212     1.29   0.199    -.0203776    .0974115
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
               InvAr |            5               5              0     | 
             IFAUkod |           15              16              1     | 
                  Ar |            6               7              1 ?   | 
           FodelseAr |           41              42              1 ?   | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher

Stage: iv

HDFE IV (2SLS) estimation
-------------------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on InKommun

Number of clusters (InKommun) =    286                Number of obs =   349384
                                                      F( 11,   285) =    31.04
                                                      Prob > F      =   0.0000
Total (centered) SS     =   20204911.1                Centered R2   =   0.0072
Total (uncentered) SS   =   20204911.1                Uncentered R2 =        .
Residual SS             =  20104886.89                Root MSE      =    7.587

------------------------------------------------------------------------------------
                   |               Robust
         Nominerad |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------------+----------------------------------------------------------------
   logpEnklavVuxen |  -.3271732   .1468612    -2.23   0.027    -.6162435   -.0381029
            Kvinna |  -.1688262   .0394401    -4.28   0.000     -.246457   -.0911953
        Gift_InvAr |   .1595319   .0559625     2.85   0.005     .0493796    .2696841
       UtbAr_InvAr |    .100156   .0130344     7.68   0.000     .0745001     .125812
    Barn0_15_InvAr |  -.0107257   .0194152    -0.55   0.581    -.0489411    .0274897
  effectiveparties |  -.1243764   .0429414    -2.90   0.004    -.2088989    -.039854
disproportionality |  -.0635302   .0184769    -3.44   0.001    -.0998987   -.0271617
         leftshare |   .4258177   .5021474     0.85   0.397    -.5625704    1.414206
      migrantshare |  -1.969997   .8328885    -2.37   0.019     -3.60939   -.3306039
     invHerfindahl |  -1.162717   .7946006    -1.46   0.144    -2.726748    .4013129
      mUtb_infodda |  -.2748873   .0659332    -4.17   0.000    -.4046651   -.1451095
------------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             46.627
                                                   Chi-sq(1) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):              2.9e+04
                         (Kleibergen-Paap rk Wald F statistic):        146.726
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         logpEnklavVuxen
Included instruments: Kvinna Gift_InvAr UtbAr_InvAr Barn0_15_InvAr
                      effectiveparties disproportionality leftshare migrantshare
                      invHerfindahl mUtb_infodda
Excluded instruments: logpEnklavVuxenInvAr
------------------------------------------------------------------------------

Absorbed degrees of freedom:
---------------------------------------------------------------------+
       Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
-------------------+-------------------------------------------------|
             InvAr |            5               5              0     | 
           IFAUkod |           15              16              1     | 
                Ar |            6               7              1 ?   | 
         FodelseAr |           41              42              1 ?   | 
---------------------------------------------------------------------+
? = number of redundant parameters may be higher

.   eststo c5

.   
.   esttab c1 c2 c3 c4 c5 using "`output'\Output\TableA6.rtf", keep(RMKvot `controls4' logpEnklavVuxen) ///
>                  replace star(* .1 ** .05 *** .01) b(3) se(3)
(note: file C:\Userdata\Shared\Dofiles\DoAnalysis\PlacementCandidacy\Output\TableA6.rtf not found)
(output written to C:\Userdata\Shared\Dofiles\DoAnalysis\PlacementCandidacy\Output\TableA6.rtf)

.  
. log close 
      name:  <unnamed>
       log:  C:\Userdata\Shared\Dofiles\DoAnalysis\PlacementCandidacy\Output\TableA4b.log
  log type:  text
 closed on:   2 Oct 2020, 10:35:17
---------------------------------------------------------------------------------------------------------------------------------------------
